import request from '@/utils/request';

//产品入库列表
export function listPlanFinish(query) {
    return request({
        url: '/system/planFinish/list',
        method: 'get',
        params: query
    })
}
// 看板
export function listPlanFinishStatus(status) {
    return request({
        url: '/system/planFinish/getPlanList?status=' + status,
        method: 'get'
    })
}

// 产品入库详细信息
export function detailPlanFinish(Id) {
    return request({
        url: '/system/planFinish/getInfo?id=' + Id,
        method: 'get'
    })
}

// 新建产品入库列表
export function addPlanFinish(data) {
    return request({
        url: '/system/planFinish/add',
        method: 'post',
        data: data
    })
}

// 编辑产品计划
export function editPlanFinish(data) {
    return request({
        url: '/system/planFinish/edit',
        method: 'post',
        data: data
    })
}

// 删除产品计划
export function delPlanFinish(Id) {
    return request({
        url: '/system/PlanFinish/remove' + Id,
        method: 'post'
    })
}

// 产品入库手动确认完成
export function planFinishConfirm(id) {
    const data = {
        id
    }
    return request({
        url: '/system/planFinish/approveConfirm',
        method: 'post',
        data
    })
}

// 装箱
export function productToPack(data) {
    return request({
        url: '/app/product/productToPacking',
        method: 'post',
        data: data
    })
}